<!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->
<html lang="en" class="no-js">
<!--<![endif]-->
<!-- BEGIN HEAD -->
<head>
<meta charset="utf-8" />
<title>商品管理 - 新增品牌</title>
<?php include($this->c['_homes']['_viewsHome'].'/_global/_head.php');?>
</head>
<!-- BEGIN BODY -->
<body class="page-header-fixed page-sidebar-fixed">
<!-- BEGIN HEADER -->
<?php include($this->c['_homes']['_viewsHome'].'/_global/head.php');?>
<!-- END HEADER -->
<div class="clearfix"></div>
<!-- BEGIN CONTAINER -->
<div class="page-container" > 
  <!-- BEGIN HORIZONTAL MENU PAGE SIDEBAR1 -->
  <?php include($this->c['_homes']['_viewsHome'].'/_global/menu.php');?>
  <!-- END BEGIN HORIZONTAL MENU PAGE SIDEBAR --> 
  <!-- BEGIN PAGE -->
  <div class="page-content"> 
    <!-- BEGIN PAGE HEADER-->
    <div class="row">
      <div class="col-md-12"> 
        <!-- BEGIN PAGE TITLE & BREADCRUMB-->
        <h3 class="page-title"> 新增品牌 </h3>
        <ul class="page-breadcrumb breadcrumb">
          <li> <i class="icon-home"></i> <a href="/manage">后台</a> <i class="icon-angle-right"></i> </li>
          <li> 商品管理 <i class="icon-angle-right"></i> </li>
          <li> <a href="/channel/brand">商品品牌</a> <i class="icon-angle-right"></i> </li>
          <li>新增品牌</li>
        </ul>
        <!-- END PAGE TITLE & BREADCRUMB--> 
      </div>
    </div>
    <!-- END PAGE HEADER--> 
    <!-- BEGIN PAGE CONTENT-->
    
    <div class="row">
      <div class="col-md-6"> 
        <!-- BEGIN SAMPLE FORM PORTLET-->
        <div class="portlet box blue">
          <div class="portlet-title">
            <div class="caption"> <i class="icon-reorder"></i> 基本信息 </div>
            <div class="tools"> <a href="" class="collapse"></a> </div>
          </div>
          <div class="portlet-body form">
            <form method="post" action="brand_do" onsubmit="return chkfrm();" enctype="multipart/form-data">
              <input type="hidden" name="act" value="add" />
              <div class="form-body">
                <div class="form-group">
                  <label >中文名称</label>
                  <div class="input-group">
                    <input type="text" class="form-control" name="name" maxlength="40" id="_name">
                  </div>
                  <span class="help-block">40个汉字以内</span> </div>

                  <div class="form-group">
                  <label >英文名称</label>
                  <div class="input-group">
                    <input type="text" class="form-control" name="names" maxlength="40" >
                  </div> 
                </div>

                <div class="form-group">
                  <label >品牌权重</label>
                  <div class="input-group">
                    <input type="text" class="form-control" name="weight"  maxlength="40" >
                  </div> 
                </div>
                <hr>
                <div class="form-group">
                  <label >所属国家</label>
                  <div class="input-group">
                    <select name="caid" id="_caid" class="form-control">
                            <option value="">请选择国家</option>
                            <?php
                            if($this->cate[0]){
                              foreach($this->cate[0] as $r){
                              ?>
                                          <option value="<?=$r['caid'];?>">
                                          <?=$r['name'];?>
                                          </option>
                                          <?
                                if($this->cate[$r['caid']]){
                                  foreach($this->cate[$r['caid']] as $s){
                                    ?>
                                          <option value="<?=$s['caid'];?>">
                                          &nbsp;&nbsp;&nbsp;&nbsp;--&nbsp;&nbsp;<?=$s['name'];?>
                                          </option>
                                          <?
                                  }
                                }
                              }
                            }             
                            ?>
                          </select>
                  </div>
                </div>
                <hr>                
                <div class="form-group">
                  <label>品牌logo</label>
                  <div class="input-group">
                    <input name="brand_pic" type="file" id="_brand_pic">
                    <p class="help-block">只允许上传JPG图片，2M以内</p>
                  </div>
                </div>
                <hr>
                <div class="form-group">
                  <label>品牌广告</label>
                  <div class="input-group">
                    <input name="cover_pic" type="file" id="_cover_pic">
                    <p class="help-block">只允许上传JPG图片，2M以内</p>
                  </div>
                </div>
                <hr>                
                <div class="form-group">
                  <label>详细说明</label>
                  <div class="input-group">
                    <textarea name="instruction" id="_instruction" cols="100" rows="10"></textarea>
                  </div> 
                </div>
                <hr>
                <div class="form-group">
                  <label>状态</label>
                  <div class="radio-list">
                    <label class="radio-inline">
                    <div id="uniform-optionsRadios4" class="radio"><span class="">
                      <input name="stat" id="optionsRadios4" value="1" checked type="radio">
                      </span></div>
                    <span class="label label-success">正常</span>
                    </label>
                    <label class="radio-inline">
                    <div id="uniform-optionsRadios5" class="radio"><span>
                      <input name="stat" id="optionsRadios5" value="2" type="radio">
                      </span></div>
                    <span class="label label-danger">禁用</span>
                    </label>
                  </div>
                </div>
                              </div>
              <div class="form-actions">
                <input type="submit" class="btn blue" value="提 交">
              </div>
            </form>
          </div>
        </div>
        <!-- END SAMPLE FORM PORTLET--> 
        
      </div>
    </div>
    <!-- END PAGE CONTENT--> 
  </div>
  <!-- END PAGE --> 
</div>
<!-- END CONTAINER -->
<?php include($this->c['_homes']['_viewsHome'].'/_global/_footer.php');?>
<script>
	jQuery(document).ready(function() {    
	   App.init();
	});
</script> 
<script type="text/javascript">
function chkfrm(){

	if($("#_name").prop("value")==""){
    alert("请填写品牌名称");
    $("#_name").focus();
    return false;
  } 

  if($("#_caid").prop("value")==""){
    alert("请选择国家");
    $("#_name").focus();
    return false;
  } 
  
}
</script> 
<!-- END JAVASCRIPTS -->
</body>
<!-- END BODY -->
</html>